
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>注册</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
      <link rel="stylesheet" href="{{static('js/user/layui.css')}}">
  <link rel="stylesheet" href="{{static('js/user/global.css')}}">
        <script src="{{static('js/jquery.cookie.js')}}"></script>
    <script src="{{static('js/user/jquery-3.3.1.min.js')}}"></script>

</head>
<body>

<div class="layui-container fly-marginTop">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li><a href="/login">登录</a></li>
        <li class="layui-this" style="color: #bf2c24">注册</li>
      </ul>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <div class="layui-form layui-form-pane">
            <form method="post" class="register_form_con">
              <div class="layui-form-item">
                <label for="L_email" class="layui-form-label">手机号</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_email" name="email" required lay-verify="email" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">当做您登录时候账号</div>
              </div>

              <div class="layui-form-item">
                <label for="L_vercode" class="layui-form-label">图片验证码</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_vercode" name="vercode" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid">
                  <img src="" id="img" class="get_pic_code" onclick="generateImageCode()">
                </div>
              </div>

               <div class="layui-form-item">
                <label for="L_vercode" class="layui-form-label">手机验证码</label>
                <div class="layui-input-inline">
                    <input type="hidden" id="csrf_toke" value="{{ csrf_token  }}">
                    <input id="image_token" hidden value="">
                  <input type="text" id="sms_code" name="vercode" required lay-verify="required" placeholder="请输入短信验证码" autocomplete="off" class="layui-input">

                </div>
                   <button class="layui-btn" onclick="send_sms()" id="get_sms" value="0" style="background-color: #bf2c24">获取验证码</button>
                       <script>
                            var tim=document.getElementById("get_sms").value;
                              function aaa(){
                                  var tim=document.getElementById("get_sms").value;
                                 var btnn=document.getElementById("get_sms");
                                 btnn.innerText = tim;
                                if(tim<=0)
                                {
                                   btnn.innerText = "获取验证码";
                                   document.getElementById("get_sms").disabled=false;
                                }
                                else
                                {
                                  btnn.innerText=tim+"  秒  ";
                                  document.getElementById("get_sms").disabled=true;
                                  tims = tim-1;
                                  btnn.value=tims;
                                }
                              }
                               setInterval("aaa()",1000);
                       </script>
{#                   <button  id="get_sms1" disabled style="width: 120px; height: 37px;color: #c2c2c2;">获取验证码</button>#}
              </div>

              <div class="layui-form-item">
                <label for="L_username" class="layui-form-label">昵称</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_username" name="username" required lay-verify="required" autocomplete="off" class="layui-input">
                </div><div class="layui-form-mid layui-word-aux">你在本站的用户名</div>
              </div>
              <div class="layui-form-item">
                <label for="L_pass" class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                  <input type="password" id="L_pass" name="pass" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">6到16个字符</div>
              </div>
              <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">确认密码</label>
                <div class="layui-input-inline">
                  <input type="password" id="L_repass" name="repass" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <button class="layui-btn" lay-filter="*" lay-submit style="background-color: #bf2c24">立即注册</button>

              </div>
               <br>
                <p>第三方快速登录</p>
                <br>
                            <a href="/qq_login">
						<img src="{{static('images/img3/3.jpg')}}" style="width: 20px"></a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <a href="/wx_login">
						<img class="d6" src="{{static('images/img3/4.jpg')}}" style="width: 20px;"></a>

            </form>
          </div>
        </div>
      </div>
    </div>
  </div>

</div>

<div class="fly-footer"><p>
        <p>    <a href="/">回到首页</a></p>
    <a href="/" target="_blank">xx小说</a>
    <a href="http://www.layui.com/template/fly/" target="_blank">xx音乐</a>
    <a href="http://fly.layui.com/jie/2461/" target="_blank">推荐云</a>
  </p>
</div>
<script src="{{ static('js/jquery.cook.js')}}"></script>
<script src="{{ static('js/user/layui.js')}}"></script>
<script src="{{ static('js/user/jwt.js')}}"></script>
<script>

        // 1. 生成一个编号
    // 严格一点的使用uuid保证编号唯一， 不是很严谨的情况下，也可以使用时间戳
    imageCodeId = generateUUID();

    // 2. 拼接验证码地址
    var imageCodeUrl = "/image_code?code_id=" + imageCodeId + "/";

    // 3. 设置页面中图片验证码img标签的src属性
    $(".get_pic_code").attr("src", imageCodeUrl);
    $("#image_token").attr("value", imageCodeId);
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  base: '../static/res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

</body>
</html>